﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace deal_h2ck.DTO
{
    public class CCurrentContext
    {
        public static bool IsLogged
        {
            get { return HttpContext.Current.Request.Cookies["Email"] != null; }
        }
        public static string Email
        {
            get { return HttpContext.Current.Request.Cookies["Email"].Value; }
        }
        public static CKhachHangDTO User
        {
            get { return HttpContext.Current.Session["Email"] as CKhachHangDTO; }
            set { HttpContext.Current.Session["Email"] = value; }
        }
        //lấy nhanh giỏ hàng của User
        public static MyCart Cart
        {
            get { return CCurrentContext.User.Cart; }
        }

    }
}